/*
 * @Author: CaiJianhao
 * @Date: 2020-01-02 09:46:41
 * @Descripttion: 
 * @LastEditTime: 2020-02-26 14:50:12
 * @LastEditors: CaiJianhao
 * @version: 
 */
#ifndef __MEASURE_H
#define __MEASURE_H

#include "stm8s.h"

void Pm_Init(void);
void DoInledTask(void);
void ScanInputTask(void);

#define RS485_CTRL_L	GPIO_WriteLow(GPIOC, GPIO_PIN_6);
#define RS485_CTRL_H	GPIO_WriteHigh(GPIOC, GPIO_PIN_6);
#define TIMEDELAY_INLED  3

#define	IS_LINE_RED_Trigger()	( GPIO_ReadInputPin(GPIOB, GPIO_PIN_5))
#define	IS_LINE_GREEN_Trigger()	( GPIO_ReadInputPin(GPIOB, GPIO_PIN_4))
#define	IS_LINE_BLUE_Trigger()	(GPIO_ReadInputPin(GPIOC, GPIO_PIN_3))

#endif